package com.rmb.api.controller;

import com.rmb.api.entity.Details;
import com.rmb.api.service.DetailsService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
/**
 * @author zhao
 */
@RestController
@RequestMapping("/Details")
public class DetailsController {
    @Autowired
    private DetailsService detailsService;

    /**
     *查询
     * **/
    @GetMapping("/findList")
    public List<Map<String,Object>> findList(){
        return detailsService.findList();
    }

    /**
     *条件查询
     * @return
     * **/
    @GetMapping("/findBy")
    public Details selectBy(@Param("ipAddr") String ipAddr, @Param("requestMethod") String requestMethod, @Param("introductory") String introductory){
        return detailsService.selectBy(ipAddr,requestMethod,introductory);
    }
}
